import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import mainpage from '../views/mainpage.vue'
// import mainpage3 from '../views/mainpage3.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: mainpage,
  },
  {
    path: '/home2',
    name: 'home2',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/mainpage2.vue')
    }
  },
  {
    path: '/detail',
    name: 'detail',
    component: function () {
      return import('../views/detail.vue')
    }
  },
  {
    path: '/detail2',
    name: 'detail2',
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/detail2.vue')
    }
  },
  {
    path: '/compare',
    name: 'method',
    component: function () {
      return import(/* webpackChunkName: "about" */ '../components/PaymentMethods/PaymentMethodsPieChart.vue')
    }
  },
  {
    path: '/method',
    name: 'compare',
    component: function () {
      return import(/* webpackChunkName: "about" */ '../components/IncomeComparison/IncomeComparisonBarChart.vue')
    }
  },
]

const router = new VueRouter({
  routes
})

export default router
